package com.share.tool.generator.db_bak.config;

import java.util.LinkedList;
import java.util.List;

public class BakConfig {
    private static List<String> share = new LinkedList<>();

    static {
        share.add("tc_oss_file");

        share.add("th_http_url_config");

        share.add("s_fund");
        share.add("s_stock");

        share.add("ts_schedule_job");
    }

    private static List<String> finance = new LinkedList<>();

    static {
        finance.add("rul_project");
        finance.add("rul_project_conf");
        finance.add("rul_strategy");
        finance.add("rul_strategy_conf");
        finance.add("rul_reason_code");

        finance.add("cor_product_variate");
        finance.add("cor_variate_conf");

        finance.add("trd_local_variate_conf");
        finance.add("trd_interface_config");
    }

    private static List<String> nacos = new LinkedList<>();

    static {
        nacos.add("config_info");
        nacos.add("roles");
        nacos.add("tenant_info");
        nacos.add("users");
    }

    private static List<String> admin = new LinkedList<>();

    static {
        admin.add("tc_dictionary");
        admin.add("tu_dept");
        admin.add("tu_menu");
        admin.add("tu_user");
        admin.add("tu_user_role");
        admin.add("tu_role");
        admin.add("tu_role_menu");
    }

    private static List<String> stockp = new LinkedList<>();

    static {
        stockp.add("base_data");
        stockp.add("stock_info_a_code_name");
    }

    private static List<String> stockj = new LinkedList<>();

    static {
        //左边是列 右边是名字
        stockj.add("`code`, `name`, `status`, `industry_name`, `industry`, `last_price`, `last_price_rate` tas_stock_base_info");
        stockj.add("ts_user");
        stockj.add("tas_trade_date");
//        stockj.add("ts_strategy_result");
    }

    private static List<String> shop = new LinkedList<>();

    static {
        shop.add("jf_integral");
        shop.add("jf_integral_detail");
        shop.add("sc_goods");
        shop.add("sc_merchant");
        shop.add("sc_merchant_store");
        shop.add("sc_order_detail");
        shop.add("sc_order");
        shop.add("tu_user");
        shop.add("yhq_coupon");
        shop.add("yhq_coupon_detail");
        shop.add("jf_integral");
        shop.add("jf_integral");
    }

    private static List<String> nextcloud = new LinkedList<>();

    static {
        nextcloud.add("oc_accounts");
        nextcloud.add("oc_accounts_data");
        nextcloud.add("oc_activity");
        nextcloud.add("oc_addressbookchanges");
        nextcloud.add("oc_addressbooks");
        nextcloud.add("oc_appconfig");
        nextcloud.add("oc_authtoken");
        nextcloud.add("oc_calendars");
        nextcloud.add("oc_cards");
        nextcloud.add("oc_cards_properties");
        nextcloud.add("oc_circles_circle");
        nextcloud.add("oc_circles_member");
        nextcloud.add("oc_circles_membership");
        nextcloud.add("oc_file_locks");
        nextcloud.add("oc_file_metadata");
        nextcloud.add("oc_filecache");
        nextcloud.add("oc_filecache_extended");
        nextcloud.add("oc_files_trash");
        nextcloud.add("oc_jobs");
        nextcloud.add("oc_mounts");
        nextcloud.add("oc_notifications_settings");
        nextcloud.add("oc_preferences");
        nextcloud.add("oc_storages");
        nextcloud.add("oc_text_documents");
        nextcloud.add("oc_text_sessions");
        nextcloud.add("oc_twofactor_providers");
        nextcloud.add("oc_user_status");
        nextcloud.add("oc_users");
    }

    private static List<String> jumpserver = new LinkedList<>();

    static {
        jumpserver.add("users_user");// 用户表
        jumpserver.add("users_usergroup");// 用户组

        jumpserver.add("assets_asset");// 资产节
        jumpserver.add("assets_node");// 节点类型
        jumpserver.add("assets_systemuser");// 节点登录的用户

        jumpserver.add("perms_assetpermission");// 用户与资产关联
    }

    private static List<String> xxl_job = new LinkedList<>();

    static {
        xxl_job.add("xxl_job_group");
        xxl_job.add("xxl_job_info");
        xxl_job.add("xxl_job_registry");
    }

    private static List<String> selenium = new LinkedList<>();

    static {
        selenium.add("user");
        selenium.add("work_calendar");
        selenium.add("base_conf");
    }

    private static List<String> mock = new LinkedList<>();

    static {
        mock.add("trig_source_conf");

        mock.add("mc_variable");
        mock.add("mc_db_variable");
        mock.add("mc_http_variable");
    }

    private static List<String> disconf = new LinkedList<>();

    static {
        disconf.add("app");
        disconf.add("config");
        disconf.add("config_history");
        disconf.add("role");
        disconf.add("env");
        disconf.add("role_resource");
        disconf.add("user");
    }

    private static List<String> wechat = new LinkedList<>();

    static {
        wechat.add("app");
    }

    private static List<String> delete = new LinkedList<>();

    static {
        delete.add("del_bucket_conf");
        delete.add("del_table_conf");
        delete.add("ts_db_conf");
        delete.add("ts_oss_conf");
    }

    public static List<String> getList(String dbName) {
        switch (dbName) {
            case "share":
                return share;
            case "nacos":
                return nacos;
            case "admin":
                return admin;
            case "shop":
                return shop;
            case "stockp":
                return stockp;
            case "stockj":
                return stockj;
            case "nextcloud":
                return nextcloud;
            case "jumpserver":
                return jumpserver;
            case "xxl_job":
                return xxl_job;
            case "finance":
                return finance;
            case "selenium":
                return selenium;
            case "mock":
                return mock;
            case "disconf":
                return disconf;
            case "wechat":
                return wechat;
            case "delete":
                return delete;
        }
        return null;
    }
}
